function abc() {
    var id_array = new Array();
    $('input[name=chec]:checked').each(function () {
        id_array.push($(this).val());//向数组中添加元素
    });  //获取界面复选框的所有值
    var id = id_array.join(',');//把复选框的值以数组形式存放
    $.ajax({
        url: "/myspringboot/purchase/findadd",
        data: {id: id},
        type: "post",
        dataType: "json",
        success: function (result) {
            if (result.msg=="成功") {
                alert("添加成功");
                window.location.reload()//刷新当前页面.
            }else {
                alert("添加失败")
            }
        }
    });
}